import Vue from 'vue'
import Router from 'vue-router'
import Home from "../components/Home";
import Login from "../components/Login";
import Register from "../components/Register";
import QQCallBack from "../components/QQCallBack";
import ForgotPassword from "../components/common/ForgotPassword";
import Writer from "@/components/Writer"
import Article from "../components/Article";
import PostArticle from "../components/PostArticle";

Vue.use(Router)

export default new Router({
  mode:'history',
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },{
      path:'/login',
      name:'Login',
      component: Login

    },
    {
      path:'/register',
      name:'Register',
      component: Register

    },
    {
       path: '/oauth_callback.html',
      name: "QQCallBack",
      component: QQCallBack,

    },
    {
       path: '/forgot_password',
      name: "forgot_password",
      component: ForgotPassword,

    },
    {
       name:"Writer",
       path:"/writer",
       component: Writer,
     },
    {
       name:"Article",
       path:"/article/:id",
       component: Article,
     },
    {
       name:"PostArticle",
       path:"/post",
       component: PostArticle,
     }
  ]
})
